package com.canton.service.impl;
import com.canton.dao.entity.DrugNode;
import com.canton.dao.repository.DrugRepository;
import com.canton.service.DrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DrugServiceImpl implements DrugService{
    @Autowired
    private DrugRepository drugRepository;


    @Override
    public DrugNode findByName(String name) {
        return drugRepository.findByName(name);
    }

    @Override
    public List<DrugNode> findAll() {
        return drugRepository.findAll();
    }

    @Override
    public List<DrugNode> findByNameLike(String likes) {
        return drugRepository.findByNameLike(likes);
    }
}
